//
//  STLLoadMv.h
//  STL_ Animation
//
//  Created by 孙健 on 16/4/13.
//  Copyright © 2016年 STL. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "STLoadModel.h"
@interface STLLoadMv : NSObject

//创建当前类的单例
+ (instancetype)sharedInstance;

//根据url获取当前的任务
- (NSURLSessionDownloadTask *)getTask:(NSString *)url;

//开始下载
- (void)download:(NSString *)url progress:(void (^)(CGFloat))progressBlock state:(void (^)(DownloadState))stateBlock;

//根据url获取当前的进度
- (CGFloat)progress:(NSString *)url;

//根据当前的URL获取文件的长度
//- (NSInteger)fileTotalLength:(NSString *)url;

- (void)start:(NSString *)url;
- (void)pause:(NSString *)url;

//判断是否下载完成
- (BOOL)isCompletion:(NSString *)url;

- (STLoadModel *)getSessionModel:(NSUInteger)taskIdentifier;


@end
